<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public $GoodsModel;
    public $CatModel;
    public function __construct(){
        parent::__construct();
        $this->GoodsModel = D('Admin/goods');
        $this->CatModel = D('Admin/Cat');
    }
    public function index(){

        $tree = $this->CatModel->getTree();
        $this->assign('tree',$tree);
        $is_hot = $this->GoodsModel->field('goods_id,goods_name,thumb_img,shop_price,market_price,goods_img')->where('is_hot=1')->order('goods_id desc')->limit('4')->select();
        
        $this->assign('is_hot',$is_hot);
        $this->display();
    }
}
